{extend name="app/shop/view/base.html"/}
{block name="resources"}
<style>
	.view-button-btn{display:inline-block;user-select:none;padding:6px 16px;border-radius:4px;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;margin-bottom:0;font-weight:400;text-align:center}
	.view-button-btn-first{width:250px;font-size:14px;color:#fff;margin-right:10px;line-height:26px}
	.view-button-btn-last{width:150px;line-height:28px;font-size:14px;color:#4dbe2e;margin-right:10px;background-color:#fff;border-color:#4dbe2e}
	.view-button-btn-first:hover{color:#fff}
	.view-button-btn-last:hover{color:#4dbe2e;}
	.view-msg{padding:24px 0 16px;font-size:12px;color:#666}
	.view-more{float:right;font-size:12px;color:#999}
	.view-top div{font-size:16px;font-weight:500;color:#323233}
	.view-top p{margin:10px 0 25px;font-size:14px;color:#969799;line-height:20px}
	.wechat-icon{color:#4dbe2e}
	.view-button{margin-top:20px}
	
	.ns-tips {overflow: hidden;}
</style>
{/block}
{block name="main"}
<div class="view-top">
	<div>

	</div>
	<p></p>
</div>

<div class="layui-collapse ns-tips">
	<div class="layui-colla-item">
		<h2 class="layui-colla-title">操作提示</h2>
		<ul class="layui-colla-content layui-show">
			<li>绑定微信公众号，把店铺和微信打通</li>
			<li>绑定后即可在这里管理你的公众号，可以在公众号自动回复/图文素材/自定义菜单等功能中结合商品销售进行推广</li>
			<li>微信给不同类型公众号提供不同的接口，我们能提供的功能也不相同</li>
			<li>我没有账号，<a href="https://mp.weixin.qq.com" target="_blank" class="ns-text-color">去设置</a></li>
		</ul>
	</div>
	<a href="https://kf.qq.com/faq/120911VrYVrA130805byM32u.html" target="_blank" class="view-more">了解更多区别</a>
</div>

<div class="view-content">
	<!-- <p class="view-msg">
		绑定微信公众号，把店铺和微信打通<br>
		绑定后即可在这里管理你的公众号，可以在公众号自动回复/图文素材/自定义菜单等功能中结合商品销售进行推广。<br>
		微信给不同类型公众号提供不同的接口，我们能提供的功能也不相同：<br>
		我没有账号，<a href="https://mp.weixin.qq.com" target="_blank" class="ns-text-color">去设置</a>
		<a href="https://kf.qq.com/faq/120911VrYVrA130805byM32u.html" target="_blank" class="view-more">了解更多区别</a>
	</p> -->
	<table class="layui-table" lay-skin="line" lay-size="lg">
		<colgroup>
			<col>
			<col>
			<col>
			<col>
		</colgroup>
		<thead>
			<tr>
				<th></th>
				<th>普通订阅号</th>
				<th>认证订阅号</th>
				<th>未认证服务号</th>
				<th>认证服务号</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td>消息自动回复</td>
				<td><i class="layui-icon layui-icon-ok wechat-icon"></i></td>
				<td><i class="layui-icon layui-icon-ok wechat-icon"></i></td>
				<td><i class="layui-icon layui-icon-ok wechat-icon"></i></td>
				<td><i class="layui-icon layui-icon-ok wechat-icon"></i></td>
			</tr>
			<tr>
				<td>微信自定义菜单</td>
				<td></td>
				<td><i class="layui-icon layui-icon-ok wechat-icon"></i></td>
				<td><i class="layui-icon layui-icon-ok wechat-icon"></i></td>
				<td><i class="layui-icon layui-icon-ok wechat-icon"></i></td>
			</tr>
			<tr>
				<td>群发/定时群发</td>
				<td></td>
				<td><i class="layui-icon layui-icon-ok wechat-icon"></i></td>
				<td></td>
				<td><i class="layui-icon layui-icon-ok wechat-icon"></i></td>
			</tr>
			<tr>
				<td>高级客户管理</td>
				<td></td>
				<td>部分功能</td>
				<td></td>
				<td><i class="layui-icon layui-icon-ok wechat-icon"></i></td>
			</tr>
			<tr>
				<td>参数二维码</td>
				<td></td>
				<td></td>
				<td></td>
				<td><i class="layui-icon layui-icon-ok wechat-icon"></i></td>
			</tr>
			<tr>
				<td>可申请微信支付</td>
				<td></td>
				<td></td>
				<td></td>
				<td><i class="layui-icon layui-icon-ok wechat-icon"></i></td>
			</tr>
		</tbody>
	</table>

</div>
<div class="view-button">
	<a class="view-button-btn view-button-btn-first ns-bg-color" onclick="auth();">
		我有微信公众号,立即去绑定
	</a>
	<a class="view-button-btn view-button-btn-last ns-border-color ns-text-color" href="{:addon_url('wechat://shop/wechat/config', [])}">
		手动添加公众号
	</a>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
	layui.use(['form'], function () {
		var form = layui.form;
		form.render();
	});

	/**
	 * 去授权
	 */
	function auth(){
		window.open("{:addon_url('wxoplatform://shop/oplatform/auth', ['auth_type' => 'wechat'])}");
		//询问框
		layer.confirm('请在新窗口中继续授权', {
			title:'提示',
			btn: ['重新授权','已完成授权'] //按钮
		}, function(){
			layer.closeAll();
			auth();
		}, function(){
			layer.closeAll();
			//验证是否授权
			$.ajax({
				type: "post",
				url: "{:addon_url('wxoplatform://shop/oplatform/wechatsettled')}",
				dataType: "JSON",
				success: function(data) {
					if(data.code >= 0){
						location.href = "{:addon_url('wechat://shop/wechat/setting')}";
					}

				}
			});
		});
	}
</script>
{/block}